package org.example;

//具体主题
public class ConcreteSubject extends Subject{

    public ConcreteSubject(String allyName) {
        System.out.println(allyName + "  现在开始");
        System.out.println("----------------------------");
        this.allyName = allyName;
    }
    @Override
    public void notifyObservers(String name) {
        for (Object obs : players) {
            if (!((Observer) obs).getName().equalsIgnoreCase(name)) {
                ((Observer) obs).help();
            }
        }
    }
}
